package com.wwwc.index.web.servlet;

import java.io.*;
import java.awt.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.ServletRequestWrapper;
import java.net.*;

import java.awt.Image;

import com.wwwc.util.web.*;
//import com.wwwc.index.web.database.*;
import com.wwwc.index.web.ejb.database.*;

public class MainBarBean {
    private EJBDatabaseQuery ejbdb;
    public static StringBuffer updateTopBar (String sid) 
    {
	StringBuffer sbf = new StringBuffer("");
	sbf.append("\n<HTML><HEAD>");
	sbf.append("\n<TITLE>update_top_frame</TITLE>");
	sbf.append("\n</HEAD><BODY><CENTER>");
	sbf.append("\n<FORM name=update_top_form method=post action=TopBarServlet target=topFrame>");
	sbf.append("\n<input type=hidden name=sid value="+sid+">");
	sbf.append("\n</FORM>");
	sbf.append("\n<SCRIPT>");
	sbf.append("\ndocument.update_top_form.submit();");
	sbf.append("\n</SCRIPT>");
	sbf.append("\n</BODY></HTML>");
	return sbf;
    }

    public static boolean showLevelCheck(String user_level, String show_level) {
	try {
	    if(Integer.parseInt(user_level)<Integer.parseInt(show_level)) {
		return false;
	    }
	}
	catch(Exception e) {
	    return false;
	}
	return true;
    }
}





